package com.bestcem.xm.om.dao.impl;

import com.bestcem.xm.om.dao.PackMiddleDao;
import com.bestcem.xm.om.dao.mapper.PackMiddleMapper;
import com.bestcem.xm.om.entity.PackMiddle;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zhangfeng <feng.zhang@idiaoyan.com>
 * @version v1.0
 * @date 2022/3/22 17:04
 */
@Slf4j
@Repository
public class PackMiddleDaoImpl implements PackMiddleDao {
    @Resource
    private PackMiddleMapper packMiddleMapper;

    @Override
    public List<String> listPackIdsByPlatformId(String platformId) {
        return packMiddleMapper.listPackIdsByPlatformId(platformId);
    }

    @Override
    public int deleteByPlatformId(String platformId) {
        return packMiddleMapper.deleteByPlatformId(platformId);
    }

    @Override
    public int batchInsert(List<PackMiddle> list) {
        return packMiddleMapper.batchInsert(list);
    }

    @Override
    public PackMiddle findOneByPlatformIdAndPackageId(String platformId, String packageId) {
        return packMiddleMapper.findOneByPlatformIdAndPackageId(platformId, packageId);
    }
}
